package castorss.src;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

/**
 * Activity opened when an item from the home display is clicked.
 */
public class EntryActivity extends Activity
{
	private String title;
	private String author;
	private String date;
	private String content;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.entry_activity);
		
		/*LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        ViewGroup vg = (ViewGroup) inflater.inflate(R.layout.entry_activity, null);
        setContentView(vg);*/

		Intent i = getIntent();
		title = i.getStringExtra("entry_title");
		author = i.getStringExtra("entry_author");
		date = i.getStringExtra("entry_date");
		content = i.getStringExtra("entry_content");
		TextView t1 = (TextView)findViewById(R.id.entry_title);
		TextView t2 = (TextView)findViewById(R.id.entry_author);
		TextView t3 = (TextView)findViewById(R.id.entry_date);
		TextView t4 = (TextView)findViewById(R.id.entry_content);
		t1.setText(title+"\n"+author+"\n"+date+"\n"+content);
		/*t2.setText("author"+author);
		t3.setText("date"+date);
		t4.setText("content"+content);*/
	}
}
